• Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Darkly)
  • No Skin
Collapse
brainCloud Forums
    • All categories
    Load new posts
Log in to post
  • devsleeperD

    Webhook routes

    Scheduled Pinned Locked Moved Solved Cloud Code webhook cloud code s2s
    12
    0 Votes
    12 Posts
    651 Views
    Paul WinterhalderP

    Cool. Thanks for sharing the solution here @devsleeper !

  • K

    Is there a place I can see all possible error code that can come back from various APIs?

    Scheduled Pinned Locked Moved Unsolved Cloud Code cloud code error
    5
    0 Votes
    5 Posts
    600 Views
    Paul WinterhalderP

    There is a global list of reason codes here - https://docs.braincloudservers.com/api/appendix/reasonCodes

  • K

    Cloud code retries, error handling question

    Scheduled Pinned Locked Moved Unsolved Cloud Code cloud code error
    2
    0 Votes
    2 Posts
    344 Views
    P

    A good way to handle failure besides retrying in code, is to schedule another script to run 1 minute later that will basically repeat the same action.

  • K

    Only allow user to change username if it is unique and does not contain profanity?

    Scheduled Pinned Locked Moved Solved General users cloud code api
    4
    0 Votes
    4 Posts
    497 Views
    K

    @Paul-Winterhalder Amazing! This is perfect for my needs-- thanks so much Paul.

  • C

    How to create a private system entity from cloud code?

    Scheduled Pinned Locked Moved Cloud Code global entities cloud code
    1
    0 Votes
    1 Posts
    261 Views
    No one has replied
  • H

    How to add to an array in Cloud Code?

    Scheduled Pinned Locked Moved Cloud Code function push cloud code script array cloud code
    2
    0 Votes
    2 Posts
    386 Views
    H

    I posted this almost 13 days ago with zero answers, so I took some time to look through a bunch of documentation and did a ton of trial and error. Please Braincloud for the love of god add this to your API.

    Rhino does not handle Arrays the way that other coding languages do.

    I figured it out, unlike most arrays that return an array after you call push- Rhino returns the new length. So if you call push, don't set it's value.

    var copyArray = []; //I assume this line tells it to be an array for (var i = 0; i < postResult.data..length; i++) { copyArray[i] = postResult.data[i]; //arrays do not behave like .Net arrays, you can change length without initializing, so you just set each index to the index of the array you're copying } copyArray.push(variableToAdd); //Do NOT set this as the value of your array, the push method returns an int (length of array) NOT an array! //you probably dont need to call push at all to add to the array as shown in the for loop above if you already know your length or want a specific length

    Then just set your value to the variable, like this

    var entityData = { "variableName": copyArray }; //No need to call Array(copyArray) or any of the prototype. slice stuff. If you call Array() you'll just nest the array a second time.

    Use this page for further info on functions you can do with arrays.

  • D

    Using numbers as JSON key.

    Scheduled Pinned Locked Moved Cloud Code cloud code
    5
    0 Votes
    5 Posts
    476 Views
    D

    @JasonL
    Thank you!!

  • D

    Tournament Questions

    Scheduled Pinned Locked Moved General portal api hook tournament cloud code
    2
    0 Votes
    2 Posts
    236 Views
    J

    (Post the answer from brainCloud chat channel)

    Actually, there is a workaround that you can perform the tournament rewards adjustments,

    Turn off the auto claim Add a post-hook to Authenticate instead <- where auto-claim would normally run And in the post-hook look to see if they have tournament rewards, and if they do, claim them there - performing any award adjustments that need to be made.
  • R

    Unique field for a Custom Entity

    Scheduled Pinned Locked Moved Cloud Code cloud code script cus cloud code
    3
    0 Votes
    3 Posts
    458 Views
    J

    Hi Reza, a simple workaround I would recommend is using our atomic methods, such as IncrementGlobalStats, to form the field values with the returned value of that method and some other characters you selected. (defined a global statistic ahead of time, call IncrementGlobalStats() get the returned current value of the global statistic, e.g. 123, then combine with the name you selected to a unique name, such as name_123)

  • T

    Stacktrace for Cloud Code errors?

    Scheduled Pinned Locked Moved Cloud Code cloud code script rhino cloud code
    6
    2 Votes
    6 Posts
    536 Views
    Paul WinterhalderP

    Well - the new release isn't out yet - it's just a Release Candidate.

    https://github.com/mozilla/rhino/releases

    That said - we are very happy to see the progress - since it has been over a year since 1.7.13 was released!

    Hopefully soon!

  • T

    Does a Pre-hook consume an extra API call?

    Scheduled Pinned Locked Moved General cloud code
    7
    0 Votes
    7 Posts
    443 Views
    A

    @Ben-Morris unfortunately yes
    they promised to solve it in BC 5.0 though

  • T

    Shared Global Context for each CloudCode invocation?

    Scheduled Pinned Locked Moved Cloud Code tuning script cloud code loot
    8
    0 Votes
    8 Posts
    635 Views
    Paul WinterhalderP

    @Travis-Brown-John You can create them manually from the Monitoring menu.

    Monitoring | Global Monitoring | Global Entities.

    Note - if your app is live, you need to unlock it first. You'll see a bit [+] button to the right of the Bulk actions drop-down.

    Good luck!

    Paul.

  • Login

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users